package lv.solcraft.replication.server.rest;

import lv.solcraft.replication.server.boot.Server;

import org.restlet.Application;
import org.restlet.Context;
import org.restlet.Restlet;
import org.restlet.Router;

public class ServerApplication extends Application {

    private final Server server;

    public ServerApplication(Context context, Server server) {
        super(context);
        this.server = server;
    }

    @Override
    public Restlet createRoot() {
        Router router = new Router();
        server.getServerRestlets().configure(router);
        return router;
    }
}
